public class h {
    public static void main(String args[]){
        String str = "20233011030";
        System.out.println(str);
        int length = str.length();
        System.out.println("长度为："+length);
        char ch = str.charAt(3);
        System.out.println("字符串中的第4个字符为："+ch);
        char chardst[] = new char[2];
        str.getChars(9,11,chardst,0);
        System.out.println(chardst);
    }
}
class hfy {
    public static void main(String args[]) {
        String str1 = "elapant";
        String str2 = "ELEPANT";
        String str3 = "Apple";
        String str4 = "app    le";
        if(str1.compareTo(str2)>0){
            System.out.println(str1+">"+str2);
        }else if(str1.compareTo(str2) == 0){
            System.out.println(str1+"="+str2);
        }else{
            System.out.println(str1+"="+str2);
        }
        if(str1.compareToIgnoreCase(str2)>0){
            System.out.println(str1+">"+str2);
        }else if(str1.compareToIgnoreCase(str2) == 0){
            System.out.println(str1+"="+str2);
        }else{
            System.out.println(str1+"<"+str2);
        }
        if(str3.equals(str4)){
            System.out.println(str3+"="+str4);
        }else{
            System.out.println(str3+"!="+str4);
        }
        if(str3.equalsIgnoreCase(str4)){
            System.out.println(str3+"="+str4);
        }else{
            System.out.println(str3+"!="+str4);
        }
    }
}




